
import { setCookie, getCookie, removeCookie } from '@/cookie'
import request from '@/utils/request'

export const login = (form) => {
    return request.post('/api/login', form)
}

export const getUserInfo = () => {
    return request.get('/api/getUserInfo')
}

export const logout = () => {
    removeCookie('token')
}

export const getToken = () => {
    return getCookie('token')
}

export const setToken = (token) => {
    setCookie('token', token)
}